<script type="text/javascript">
$(document).ready(function(){
    mbsimajax(APP+"/Member/ajax_address/","ajax_list");
});

//编辑用户地址薄
function edit_address(id)
{
    addDialogbox("#mb_address_edit","编辑地址",10001,502);
    //quitScreenMask();
    $.ajax({
        url: APP+"/Member/mb_address_edit/id/"+id,
        cache: false,
        success: function(msg){
            $("#mb_address_edit .dialogboxContent").html(msg);
            $("#mb_address_edit .dialogboxContent").addClass("regWrap");
        }
    });
}

//增加用户地址薄
function add_address()
{
    addDialogbox("#mb_address_add","请填写您的新地址",10001,502);
    //quitScreenMask();
    $.ajax({
        url: APP+"/Member/mb_address_add/id/",
        cache: false,
        success: function(msg){
            $("#mb_address_add .dialogboxContent").html(msg);
            $("#mb_address_add .dialogboxContent").addClass("regWrap");
        }
    });
}

//编辑用户地址薄
function del_address(id)
{
    addDialogbox("#mb_address_del","你确认删除本信息吗?",10001,502);
    msg='删除本信息将不能恢复!<br>    '+
            '<div class="paragraph">'+
                '<span class="button">'+
                    '<span class="first-child">'+
                        '<button type="button" class="f12" onclick="del_address_yes('+id+')">确认删除本信息</button>'+
                    '</span>'+
                '</span>'+
                '<span class="button">'+
                    '<span class="first-child">'+
                        '<button type="button" class="f12" onclick="del_address_no()">返回</button>'+
                    '</span>'+
                '</span>'+
            '</div>';
    $("#mb_address_del .dialogboxContent").html(msg);
}

function del_address_no(){
    removeDialogbox("#mb_address_del");
}

function del_address_yes(id){
    $.ajax({
        url: APP+"/Member/mb_address_del/id/"+id,
        cache: false,
        success: function(msg){
            mbsimajax(APP+"/Member/ajax_address/","ajax_list");
            removeDialogbox("#mb_address_del");
        }
    });

}
</script>


<div class="container">
    <div class="tabview">
        <h2 class="title fl">我的地址簿 <a href="javascript:void(0);" onclick="add_address();" style=" padding-left:5px; font-weight:normal;">[增加新地址]</a></h2>
    </div>

    <div id="ajax_list" class="content" style="display:block;">
    </div>
</div>